import { request } from '../../utils/request'
import { getLiveId } from '../../utils/storage'

// 色子游戏支付
export function diceRecharge(paramObj) {
  return request('hmWxmoney/playDice', 'POST', {
    totalfee: 0.01,
    splid: getLiveId(),
    USER_ID: paramObj.userId,
    openid: paramObj.openId,
  });
}

// 获取色子游戏信息gameDice/getDiceInfo
export function getDiceInfo(isLoop) {
  return request('gameDice/getDiceInfo', 'GET', {
    splid: getLiveId(),
    cancelLoading: isLoop ? isLoop : '',
  });
}

// 开始摇色子游戏
export function startDiceGame(paramObj) {
  return request('gameDice/robDice', 'POST', {
    splid: getLiveId(),
    id: paramObj.diceChanceId,
  });
}

// 获取排行榜
export function getDiceRankList() {
  return request('gameDice/getDiceRank', 'GET', {
    splid: getLiveId(),
  });
}
